﻿using WebMvc.Models;
 
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using DoMain.IdentityRoles;
using DoMain.IdentityUsers;

namespace WebMvc.Controllers
{
    
    public class RoleController : BaseController
    {
        private IIdentityRoleRepository _roleRepo;
        private IIdentityUserRepository _userRepo;
        /*
                public RoleController() {
                    _userRepo = IoC.Instance.Resolve<IUserRepository>();
                    _roleRepo = IoC.Instance.Resolve<IRoleRepository>();
                }
                */
        public RoleController(IIdentityUserRepository userRepo, IIdentityRoleRepository roleRepo)
        {
            _userRepo = userRepo;
            _roleRepo = roleRepo;
        }
   
        public ActionResult Index()
        {
            var list = new List<IdentityRole>();

            list = _roleRepo.FindAll().ToList();


            return View(list);
        }
    }
}